package main

import (
	"fmt"

	"github.com/tidwall/gjson"
)

var json = `{"args":{"foo":"bar","foo2":2}}`

func main() {
	results := gjson.Get(json, "args.foo")
	fmt.Println(results.String())

	results2 := gjson.Get(json, "args.foo2")
	fmt.Println(results2.Int())

	results3 := gjson.Get(json, "args.foo3")
	fmt.Println(results3.Int())

	byteNew := gjson.AppendJSONString([]byte("1231"), json)

	fmt.Println(string(byteNew))

}
